<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>cornetto.server</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="cornetto-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Pycorneto</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="cornetto-module.html">Package&nbsp;cornetto</a> ::
        Module&nbsp;server
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="cornetto.server-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module server</h1><p class="nomargin-top"><span class="codelink"><a href="cornetto.server-pysrc.html">source&nbsp;code</a></span></p>
<p>socket server exposing Cornetto database through XML-RPC</p>

<hr />
<div class="fields">      <p><strong>Version:</strong>
        0.6
      </p>
      <p><strong>Author:</strong>
        Erwin Marsi &lt;e.c.marsi@uvt.nl&gt;
      </p>
</div><!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="cornetto.server.CornetProxy-class.html" class="summary-name">CornetProxy</a><br />
      A proxy to the Cornet class which serves to:
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="cornetto.server-module.html#start_server" class="summary-sig-name">start_server</a>(<span class="summary-sig-arg">cdb_lu</span>,
        <span class="summary-sig-arg">cdb_syn</span>,
        <span class="summary-sig-arg">host</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">localhost</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">port</span>=<span class="summary-sig-default">5204</span>,
        <span class="summary-sig-arg">log</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">verbose</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">max_depth</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">similarity</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">proxy_class</span>=<span class="summary-sig-default">None</span>)</span><br />
      main function to start the Cornetto XMLRPC server</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="cornetto.server-pysrc.html#start_server">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="echo"></a><span class="summary-sig-name">echo</span>(<span class="summary-sig-arg">s</span>)</span><br />
      simply returns the input (useful for testing the socket connection)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="cornetto.server-pysrc.html#echo">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="cornetto.server-module.html#__revision__" class="summary-name">__revision__</a> = <code title="'$Id: server.py 1148 2009-11-16 12:00:20Z emarsi $'"><code class="variable-quote">'</code><code class="variable-string">$Id: server.py 1148 2009-11-16 12:00:20Z emars</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="cornetto.server-module.html#_help_specs_text" class="summary-name" onclick="show_private();">_help_specs_text</a> = <code title="'''
Most methods require input in the form of a shorthand for
specifying lexical units and relations, as described below.


*** Lexical units specifications ***

A specification of lexical units consists of three parts, separated by\
..."><code class="variable-quote">'</code><code class="variable-string">\nMost methods require input in the form o</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="cornetto.server-module.html#_help_formats_text" class="summary-name" onclick="show_private();">_help_formats_text</a> = <code title="'''&quot;
Lexical units and relations can be returned in several formats.
The following formats are currently supported:

1. spec

   This is the same format used for specifying lexical units and relat\
ions.
..."><code class="variable-quote">'</code><code class="variable-string">&quot;\nLexical units and relations can be re</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'cornetto'"><code class="variable-quote">'</code><code class="variable-string">cornetto</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="start_server"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">start_server</span>(<span class="sig-arg">cdb_lu</span>,
        <span class="sig-arg">cdb_syn</span>,
        <span class="sig-arg">host</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">localhost</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">port</span>=<span class="sig-default">5204</span>,
        <span class="sig-arg">log</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">verbose</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">max_depth</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">similarity</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">proxy_class</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="cornetto.server-pysrc.html#start_server">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>main function to start the Cornetto XMLRPC server</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>cdb_lu</code></strong> (file or filename) - xml definition of the lexical units</li>
        <li><strong class="pname"><code>cdb_syn</code></strong> (file or filename) - xml definition of the synsets</li>
        <li><strong class="pname"><code>host</code></strong> (string) - host to listen on</li>
        <li><strong class="pname"><code>port</code></strong> (int) - port to listen on</li>
        <li><strong class="pname"><code>log</code></strong> (bool) - log requests</li>
        <li><strong class="pname"><code>verbose</code></strong> (bool) - verbose output during parsing</li>
        <li><strong class="pname"><code>max_depth</code></strong> (int) - maximal search depth (between 1 and 9)</li>
        <li><strong class="pname"><code>similarity</code></strong> (bool) - extend interface with word similarity measures from SimCornet 
          (requires cdb_lu file with counts)</li>
        <li><strong class="pname"><code>proxy_class</code></strong> ((subclass of) CornetProxy) - class that serves as proxy to (a subclass of) the Cornet class 
          (e.g. CornetProxy or SimCornetProxy)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__revision__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">__revision__</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">$Id: server.py 1148 2009-11-16 12:00:20Z emarsi $</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_help_specs_text"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_help_specs_text</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string"></code>
<code class="variable-string">Most methods require input in the form of a shorthand for</code>
<code class="variable-string">specifying lexical units and relations, as described below.</code>
<code class="variable-string"></code>
<code class="variable-string"></code>
<code class="variable-string">*** Lexical units specifications ***</code>
<code class="variable-string"></code>
<code class="variable-string">A specification of lexical units consists of three parts, separated by</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_help_formats_text"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_help_formats_text</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'''</code><code class="variable-string">&quot;</code>
<code class="variable-string">Lexical units and relations can be returned in several formats.</code>
<code class="variable-string">The following formats are currently supported:</code>
<code class="variable-string"></code>
<code class="variable-string">1. spec</code>
<code class="variable-string"></code>
<code class="variable-string">   This is the same format used for specifying lexical units and relat</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">ions.</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="cornetto-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Pycorneto</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Mon Feb 22 20:26:38 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
